home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / libg_261.zip / libg_261 / libio / tests / tFile.exp < prev    next >
Text File  |  1994-03-04  |  2KB  |  76 lines

  1. Hello, world via cout
  2. Hello, world via cerr
  3. enter a char:c = "a"
  4. enter three integers (short, int, long):first  = 123 via dec =      123
  5. second = 4567 via form = 4567 = 010727 via cout.form = 4567 = 0x11d7
  6. third  = 89012 via hex = 15bb4
  7. enter a float then a double:first  = 123.456
  8. second = -0.012
  9. enter 5 characters separated with spaces:first  = 1
  10. rest   =  2 3 4 5
  11. A 10-character buffer: abcdefghi
  12.  
  13. Making streams sout and sin...contents of file:
  14. Thisfilehasonelinetestingoutputstreams.
  15. Making File tf ... first line of file:
  16. This is the first and only line of this file.
  17. next char = 10
  18. reopening tempfile, appending: Now there is a second line.
  19. First 10 chars via raw system read after reopen for input:
  20. This is th
  21. Contents after raw lseek to pos 5:
  22. is the first and only line of this file.
  23. Now there is a second line.
  24.  
  25. Making SFile rf...odd elements of file in reverse order:
  26. (i = 9 c = j d = 0.009)
  27. (i = 7 c = h d = 0.007)
  28. (i = 5 c = f d = 0.005)
  29. (i = 3 c = d d = 0.003)
  30. (i = 1 c = b d = 0.001)
  31.  
  32. Making PlotFile pf ...(You may delete or attempt to plot plot.out)
  33. creating ostrstream...
  34. with contents:
  35. This is a string-based stream.
  36. With two lines.
  37. using it to create istrstream...
  38. with contents:
  39. This is a string-based stream.
  40. With two lines.
  41. Testing string-based stream using strstream.
  42.  
  43. Making filebuf streams fout and fin...contents of file:
  44. Thisfilehasonelinetestingoutputstreams.
  45.  
  46. This is line 1 of ftmp0
  47. This is line 2 of ftmp0
  48.  
  49. This is line 1 of ftmp1
  50. This is line 2 of ftmp1
  51.  
  52. This is line 1 of ftmp2
  53. This is line 2 of ftmp2
  54.  
  55. 5.50+6.25 = 1.175e+01
  56. Previous line has  21 characters
  57. Previous line has +32 characters
  58. +__34567(dec) = 0x__8707(hex) = _0103407(oct) [showbase on]
  59. +__34567(dec) = ____8707(hex) = __103407(oct) [showbase off]
  60. -__34567(dec) = 0x__78f9(hex) = __074371(oct) [showbase on]
  61. -__34567(dec) = ____78f9(hex) = ___74371(oct) [showbase off]
  62. ______+0(dec) = _____0x0(hex) = _______0(oct) [showbase on]
  63. ______+0(dec) = _______0(hex) = _______0(oct) [showbase off]
  64. ___34567(dec) = __0X8707(hex) = _0103407(oct) [showbase on]
  65. ___34567(dec) = ____8707(hex) = __103407(oct) [showbase off]
  66. -34567__(dec) = 0X78F9__(hex) = 074371__(oct) [showbase on]
  67. -34567__(dec) = 78F9____(hex) = 74371___(oct) [showbase off]
  68. 0       (dec) = 0X0     (hex) = 0       (oct) [showbase on]
  69. 0       (dec) = 0       (hex) = 0       (oct) [showbase off]
  70. Final names & states:
  71. cin:      (stdin)    0
  72. cout:     (stdout)    0
  73. cerr:     (stderr)    0
  74.  
  75. end of test.
  76.